#include "epollServer.hpp"
#include <memory>

using namespace std;
using namespace epollServer;


inline static void Usage(const string& cmd)
{
    cout << "\nUsage\n\t" << cmd << " port" << endl << endl;; 
}

string Transaction(const string& request)
{
    return request;
}
int main(int argc, char* argv[])
{        
    if(argc != 2)
    {
        Usage(argv[0]);
        exit(USAGE_ERR);
    }
    unique_ptr<EpollServer> svr(new EpollServer(Transaction, atoi(argv[1])));
    svr->initServer();
    svr->start();
    return 0;
}